package demo.classuse;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/7/19-07-19-15:21
 * @Description：demo.classuse
 */
public class Teacher {
    private String name;    //姓名
    private double money;    //工资
    private String course;    //教授课程

    public Teacher(String name, double money, String course) {
        this.name = name;
        this.money = money;
        this.course = course;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", money=" + money +
                ", course='" + course + '\'' +
                '}';
    }

    public Teacher() {
        this("hhh",10000.0,"计算机");
    }

    //展示个人信息
    public void show(){
        System.out.println("个人信息：[ name: "+name+", money: "+money+", course: "+course);
    }
    //输出上课
    public void teacher(){
        System.out.println("正在上"+this.course+"课中....");
    }
    //获取姓名
    public String getName(){
        return this.name;
    }
    //设置姓名
    public void setName(String name){
        this.name = name;
    }
    public String getCourse(){
        return this.course;
    }
    public void setCourse(String course){
        this.course = course;
    }
    public double getMoney(){
        return this.money;
    }
    public void setMoney(double money){
        this.money = money;
    }
}
